package com.zhuhao.design_mode.behavioral_pattern.chain_responsibility;

/**
 * @Author halk
 * @Description 责任链模式(Chain of responsibility pattern): 通过责任链模式, 你可以为某个请求创建一个对象链.
 * 每个对象依序检查此请求并对其进行处理或者将它传给链中的下一个对象。
 * @Date 2022/6/10 11:05
 * @Param
 * @return
 **/
public abstract class Handler {
    protected Handler successor;

    public Handler(Handler successor) {
        this.successor = successor;
    }

    protected abstract void handleRequest(Request request);
}
